import { defHttp } from '/@/utils/http/axios';
var Api;
(function (Api) {
    Api["GetMenuList"] = "/sys/permission/getUserPermissionByToken";
})(Api || (Api = {}));
/**
 * @description: Get user menu based on id
 */
export const getMenuList = () => {
    return new Promise((resolve) => {
        //为了兼容mock和接口数据
        defHttp.get({ url: Api.GetMenuList }).then((res) => {
            if (Array.isArray(res)) {
                resolve(res);
            }
            else {
                resolve(res['menu']);
            }
        });
    });
};
